home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
- #include <vcl\vcl.h>
- #pragma hdrstop
-
- #include "Main.h"
- //---------------------------------------------------------------------------
- #pragma link "sampreg"
- #pragma resource "*.dfm"
- TForm1 *Form1;
- //---------------------------------------------------------------------------
- __fastcall TForm1::TForm1(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::txtUserNameChange(TObject *Sender)
- {
- txtCodeOut->Text = "";
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::txtPrivateKeyChange(TObject *Sender)
- {
- txtCodeOut->Text = "";
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::rgUnlockTypeClick(TObject *Sender)
- {
- if (rgUnlockType->ItemIndex == 0)
- {
- seExtension->Enabled = False;
- seExtension->Value = 0;
- lblExtensionLength->Enabled = False;
- }
- else
- {
- seExtension->Enabled = True;
- lblExtensionLength->Enabled = True;
- }
-
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::seExtensionChange(TObject *Sender)
- {
- if (seExtension->Value == 0) rgUnlockType->ItemIndex = 0;
- else rgUnlockType->ItemIndex = 1;
- txtCodeOut->Text = "";
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::btnGenerateKeyClick(TObject *Sender)
- {
- txtCodeOut->Text = GenerateKey(txtUserName->Text.c_str(), txtPrivateKey->Text.c_str(), seExtension->Value);
-
- }
- //---------------------------------------------------------------------------